---
swagger: '2.0'
info:
  version: 1.0.0
  title: GeoServer WMTS Store Layers
  description: A WMTS store is a store whose source is a remote WMTS service. Also known as "Cascading WMTS". A WMTS store layer is a layer from this store.
  contact:
    name: GeoServer
    email: 'geoserver-users@sourceforge.net'
    url: 'http://geoserver.org/comm/'
host: localhost:8080
basePath: /geoserver/rest

paths:
  /workspaces/{workspace}/wmtslayers:

    get:
      operationId: getWMTSStoreLayers
      tags:
       - "WMTSLayers"
      description: Retrieves the WMTS layers available on the server. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/workspaces/{workspace}/wmtslayers" for XML).
      parameters:
        - name: workspace
          in: path
          description: Name of the workspace
          required: true
          type: string
        - name: list
          in: query
          description: Set "list=available" to see all possible layers in the store, not just ones currently published
          type: string
          default: configured
          enum:
          - available
          - configured
      produces:
        - application/xml
        - application/json
        - text/html
      responses:
        200:
          description: OK
          schema:
            $ref: "#/definitions/WMTSStoreLayersList"
          examples:
            application/xml: |
              <wmtsLayers>
                <wmtsLayer>
                  <name>dem</name>
                  <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/cite/wmtsstores/altgs/wmtslayers/dem.xml" type="application/xml"/>
                </wmtsLayer>
                <wmtsLayer>
                  <name>states</name>
                  <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/cite/wmtsstores/altgs/wmtslayers/states.xml" type="application/xml"/>
                </wmtsLayer>
              </wmtsLayers>
            application/json: |
              {"wmtsLayers":{"wmtsLayer":[{"name":"dem","href":"http:\/\/localhost:8080\/geoserver\/rest\/workspaces\/cite\/wmtsstores\/altgs\/wmtslayers\/dem.json"},{"name":"states","href":"http:\/\/localhost:8080\/geoserver\/rest\/workspaces\/cite\/wmtsstores\/altgs\/wmtslayers\/states.json"}]}}
            application/xml (list=available): |
              <list>
                <wmtsLayerName>ne:basemap</wmtsLayerName>
                <wmtsLayerName>ne:ne1</wmtsLayerName>
                <wmtsLayerName>ne:boundary_lines_land</wmtsLayerName>
                <wmtsLayerName>ne:states_provinces_lines</wmtsLayerName>
                <wmtsLayerName>ne:populated_places</wmtsLayerName>
                <wmtsLayerName>opengeo:countries</wmtsLayerName>
                <wmtsLayerName>usgs:dem</wmtsLayerName>
                <wmtsLayerName>ne:ocean</wmtsLayerName>
                <wmtsLayerName>ne:roads</wmtsLayerName>
                <wmtsLayerName>usa:states</wmtsLayerName>
                <wmtsLayerName>ne:states_provinces_shp</wmtsLayerName>
                <wmtsLayerName>ne:urban_areas</wmtsLayerName>
              </list>
            application/json (list=available): |
              {"list":{"string":["ne:basemap","ne:ne1","ne:boundary_lines_land","ne:states_provinces_lines","ne:populated_places","opengeo:countries","usgs:dem","ne:ocean","ne:roads","usa:states","ne:states_provinces_shp","ne:urban_areas"]}}

    post:
      operationId: postWMTSStoreLayers
      tags:
       - "WMTSLayers"
      description: Publishes a new WMTS store layer.
      parameters:
        - name: workspace
          in: path
          description: Name of the workspace
          required: true
          type: string
        - name: WMTSStoreLayerBody
          in: body
          description: Body of the WMTS store layer
          required: true
          schema:
            $ref: "#/definitions/WMTSStoreLayerInfo"
      consumes:
        - application/xml
        - application/json
      responses:
        201:
          description: Created
          headers:
            Location:
              description: Location of the newly created layer.
              type: string

    put:
      operationId: putWMTSStoreLayers
      tags:
       - "WMTSLayers"
      description: Invalid. Use POST for adding a new layer, or PUT on an individual layer to edit it.
      responses:
        405:
          description: Method Not Allowed

    delete:
      operationId: deleteWMTSStoreLayers
      tags:
       - "WMTSLayers"
      description: Invalid. Can only delete an individual layer.
      responses:
        405:
          description: Method Not Allowed


  /workspaces/{workspace}/wmtslayers/{wmtslayer}:

    get:
      operationId: getWMTSStoreLayer
      tags:
       - "WMTSLayers"
      description: Retrieves an individual WMTS layer. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/workspaces/{workspace}/wmtslayers/{wmtslayer}.xml" for XML).
      produces:
        - application/xml
        - application/json
        - text/html
      parameters:
        - name: workspace
          in: path
          description: Name of the workspace
          required: true
          type: string
        - name: wmtslayer
          in: path
          description: Name of the layer
          required: true
          type: string
        - name: quietOnNotFound
          in: query
          description: When set to "true", will not log an exception when the style is not present. The 404 status code will still be returned. Allowable values are "true" or "false" (default).
          type: boolean
          required: false
      responses:
        200:
          description: OK
          schema:
            $ref: "#/definitions/WMTSStoreLayerInfo"
          examples:
            application/xml: |
              <wmtsLayer>
                <name>dem</name>
                <nativeName>usgs:dem</nativeName>
                <namespace>
                  <name>cite</name>
                  <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/namespaces/cite.xml" type="application/xml"/>
                </namespace>
                <title>Digital elevation model</title>
                <description>USGS GTOPO30 digital elevation model</description>
                <abstract>USGS GTOPO30 digital elevation model</abstract>
                <keywords>
                  <string>WCS</string>
                  <string>GeoTIFF</string>
                  <string>W100N40</string>
                </keywords>
                <nativeCRS>GEOGCS[&quot;WGS 84&quot;, &#xd;
                DATUM[&quot;World Geodetic System 1984&quot;, &#xd;
                  SPHEROID[&quot;WGS 84&quot;, 6378137.0, 298.257223563, AUTHORITY[&quot;EPSG&quot;,&quot;7030&quot;]], &#xd;
                  AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]], &#xd;
                PRIMEM[&quot;Greenwich&quot;, 0.0, AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]], &#xd;
                UNIT[&quot;degree&quot;, 0.017453292519943295], &#xd;
                AXIS[&quot;Geodetic longitude&quot;, EAST], &#xd;
                AXIS[&quot;Geodetic latitude&quot;, NORTH], &#xd;
                AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]]</nativeCRS>
                <srs>EPSG:4326</srs>
                <nativeBoundingBox>
                  <minx>-100.0</minx>
                  <maxx>-60.000000000015994</maxx>
                  <miny>-9.999999999980012</miny>
                  <maxy>39.99999999999999</maxy>
                  <crs>EPSG:4326</crs>
                </nativeBoundingBox>
                <latLonBoundingBox>
                  <minx>-100.0</minx>
                  <maxx>-60.000000000015994</maxx>
                  <miny>-9.999999999980012</miny>
                  <maxy>39.99999999999999</maxy>
                  <crs>EPSG:4326</crs>
                </latLonBoundingBox>
                <projectionPolicy>FORCE_DECLARED</projectionPolicy>
                <enabled>true</enabled>
                <metadata>
                  <entry key="cachingEnabled">false</entry>
                </metadata>
                <store class="wmtsStore">
                  <name>cite:altgs</name>
                  <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/cite/wmtsstores/altgs.xml" type="application/xml"/>
                </store>
              </wmtsLayer>
            application/json: |
              {"wmtsLayer":{"name":"dem","nativeName":"usgs:dem","namespace":{"name":"cite","href":"http://localhost:8080/geoserver/rest/namespaces/cite.json"},"title":"Digital elevation model","description":"USGS GTOPO30 digital elevation model","abstract":"USGS GTOPO30 digital elevation model","keywords":{"string":["WCS","GeoTIFF","W100N40"]},"nativeCRS":"GEOGCS[\"WGS 84\", \r\n  DATUM[\"World Geodetic System 1984\", \r\n    SPHEROID[\"WGS 84\", 6378137.0, 298.257223563, AUTHORITY[\"EPSG\",\"7030\"]], \r\n    AUTHORITY[\"EPSG\",\"6326\"]], \r\n  PRIMEM[\"Greenwich\", 0.0, AUTHORITY[\"EPSG\",\"8901\"]], \r\n  UNIT[\"degree\", 0.017453292519943295], \r\n  AXIS[\"Geodetic longitude\", EAST], \r\n  AXIS[\"Geodetic latitude\", NORTH], \r\n  AUTHORITY[\"EPSG\",\"4326\"]]","srs":"EPSG:4326","nativeBoundingBox":{"minx":-100,"maxx":-60.000000000015994,"miny":-9.999999999980012,"maxy":39.99999999999999,"crs":"EPSG:4326"},"latLonBoundingBox":{"minx":-100,"maxx":-60.000000000015994,"miny":-9.999999999980012,"maxy":39.99999999999999,"crs":"EPSG:4326"},"projectionPolicy":"FORCE_DECLARED","enabled":true,"metadata":{"entry":{"@key":"cachingEnabled","$":"false"}},"store":{"@class":"wmtsStore","name":"cite:altgs","href":"http://localhost:8080/geoserver/rest/workspaces/cite/wmtsstores/altgs.json"}}}

    post:
      operationId: postWMTSStoreLayer
      tags:
       - "WMTSLayers"
      description: Invalid. Use PUT to edit a layer, or POST on the /wmtslayers endpoint to add a new layer.
      responses:
        405:
          description: Method Not Allowed

    put:
      operationId: putWMTSStoreLayer
      tags:
       - "WMTSLayers"
      description: Edits an existing WMTS store layer.
      parameters:
        - name: workspace
          in: path
          description: Name of the workspace
          required: true
          type: string
        - name: wmtslayer
          in: path
          description: Name of the layer to be edited
          required: true
          type: string
        - name: WMTSStoreLayerBody
          in: body
          description: Body of the WMTS store layer
          required: true
          schema:
            $ref: "#/definitions/WMTSStoreLayerInfo"
        - name: calculate
          in: query
          description: Specifies whether to recalculate any bounding boxes for a wmtWMTSs layer. Some properties are automatically recalculated when necessary. In particular, the native bounding box is recalculated when the projection or projection policy are changed, and the lat/lon bounding box is recalculated when the native bounding box is recalculated, or when a new native bounding box is explicitly provided in the request. (The native and lat/lon bounding boxes are not automatically recalculated when they are explicitly included in the request.) In addition, the client may explicitly request a fixed set of fields to calculate, by including a comma-separated list of their names in the recalculate parameter.  The empty parameter 'recalculate=' is useful avoid slow recalculation when operating against large datasets as 'recalculate=' avoids calculating any fields, regardless of any changes to projection, projection policy, etc. The nativebbox parameter 'recalculate=nativebbox' is used recalculates the native bounding box, while avoiding recalculating the lat/lon bounding box. Recalculate parameters can be used in together - 'recalculate=nativebbox,latlonbbox' can be used after a bulk import to  to recalculates both the native bounding box and the lat/lon bounding box.
          required: false
          type: array
          collectionFormat: csv
          minItems: 0
          maxItems: 2
          items:
            type: string
            enum: [nativebbox,latlonbbox]
      consumes:
        - application/xml
        - application/json
      responses:
        201:
          description: Created
          headers:
            Location:
              description: Location of the newly created layer.
              type: string 

    delete:
      operationId: deleteWMTSStoreLayer
      tags:
       - "WMTSLayers"
      description: Deletes a layer from the server.
      parameters:
        - name: workspace
          in: path
          description: Name of the workspace
          required: true
          type: string
        - name: wmtslayer
          in: path
          description: Name of the layer to be deleted
          required: true
          type: string
        - name: recurse
          in: query
          description: Recursively deletes all layers referenced by the specified wmtslayer. Allowed values for this parameter are true or false. The default value is false. A request with 'recurse=false' will fail if any layers reference the wmtslayer.
          required: false
          type: boolean
          default: false
      responses:
        200:
          description: OK
 

  /workspaces/{workspace}/wmtsstores/{wmtsstore}/layers:

    get:
      operationId: getWMTSStoreStoreLayers
      tags:
       - "WMTSLayers"
      description: Retrieves the WMTS store layers available in the given store. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/workspaces/{workspace}/wmtsstores/{wmtsstore}/wmtslayers.xml" for XML).
      parameters:
        - name: workspace
          in: path
          description: Name of the workspace
          required: true
          type: string
        - name: wmtsstore
          in: path
          description: Name of the store
          required: true
          type: string
        - name: list
          in: query
          description: Set "list=available" to see all possible layers in the store, not just ones currently published
          default: configured
          enum:
          - available
          - configured
          type: string
      produces:
        - application/xml
        - application/json
        - text/html
      responses:
        200:
            description: OK
            schema:
              $ref: "#/definitions/WMTSStoreLayersList"
            examples:
              application/xml: |
                <wmtsLayers>
                  <wmtsLayer>
                    <name>dem</name>
                    <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/cite/wmtsstores/altgs/wmtslayers/dem.xml" type="application/xml"/>
                  </wmtsLayer>
                  <wmtsLayer>
                    <name>states</name>
                    <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/cite/wmtsstores/altgs/wmtslayers/states.xml" type="application/xml"/>
                  </wmtsLayer>
                </wmtsLayers>
              application/json: |
                {"wmtsLayers":{"wmtsLayer":[{"name":"dem","href":"http:\/\/localhost:8080\/geoserver\/rest\/workspaces\/cite\/wmtsstores\/altgs\/wmtslayers\/dem.json"},{"name":"states","href":"http:\/\/localhost:8080\/geoserver\/rest\/workspaces\/cite\/wmtsstores\/altgs\/wmtslayers\/states.json"}]}}
              application/xml (list=available): |
                <list>
                  <wmtsLayerName>ne:basemap</wmtsLayerName>
                  <wmtsLayerName>ne:ne1</wmtsLayerName>
                  <wmtsLayerName>ne:boundary_lines_land</wmtsLayerName>
                  <wmtsLayerName>ne:states_provinces_lines</wmtsLayerName>
                  <wmtsLayerName>ne:populated_places</wmtsLayerName>
                  <wmtsLayerName>opengeo:countries</wmtsLayerName>
                  <wmtsLayerName>usgs:dem</wmtsLayerName>
                  <wmtsLayerName>ne:ocean</wmtsLayerName>
                  <wmtsLayerName>ne:roads</wmtsLayerName>
                  <wmtsLayerName>usa:states</wmtsLayerName>
                  <wmtsLayerName>ne:states_provinces_shp</wmtsLayerName>
                  <wmtsLayerName>ne:urban_areas</wmsLayerName>
                </list>
              application/json (list=available): |
                {"list":{"string":["ne:basemap","ne:ne1","ne:boundary_lines_land","ne:states_provinces_lines","ne:populated_places","opengeo:countries","usgs:dem","ne:ocean","ne:roads","usa:states","ne:states_provinces_shp","ne:urban_areas"]}}

    post:
      operationId: postWMTSStoreStoreLayers
      tags:
       - "WMTSLayers"
      description: Publishes a new WMTS store layer in the given store.
      parameters:
        - name: workspace
          in: path
          description: Name of the workspace
          required: true
          type: string
        - name: wmtsstore
          in: path
          description: Name of the data store
          required: true
          type: string
        - name: WMTSStoreLayerBody
          in: body
          description: Body of the WMTS store layer
          required: true
          schema:
            $ref: "#/definitions/WMTSStoreLayerInfo"
      consumes:
        - application/xml
        - application/json
      responses:
        201:
          description: Created
          headers:
            Location:
              description: Location of the newly created layer
              type: string

    put:
      operationId: putWMTSStoreStoreLayers
      tags:
       - "WMTSLayers"
      description: Invalid. Use POST for adding a new layer, or PUT on an individual layer to edit it.
      responses:
        405:
          description: Method Not Allowed

    delete:
      operationId: deleteWMTSStoreStoreLayers
      tags:
       - "WMTSLayers"
      description: Invalid. Can only delete an individual layer.
      responses:
        405:
          description: Method Not Allowed


  /workspaces/{workspace}/wmtsstores/{wmtsstore}/layers/{wmtslayer}:

    get:
      operationId: getWMTSStoreStoreLayer
      tags:
       - "WMTSLayers"
      description: Retrieves an individual WMTS store layer for a given store. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/workspaces/{workspace}/wmtsstores/{wmtsstore}/wmtslayers/{wmtslayer}.xml" for XML).
      produces:
        - application/xml
        - application/json
        - text/html
      parameters:
        - name: workspace
          in: path
          description: Name of the workspace
          required: true
          type: string
        - name: wmtsstore
          in: path
          description: Name of the store
          required: true
          type: string
        - name: wtmslayer
          in: path
          description: Name of the layer
          required: true
          type: string
        - name: quietOnNotFound
          in: query
          description: When set to "true", will not log an exception when the style is not present. The 404 status code will still be returned. Allowable values are "true" or "false" (default).
          type: boolean
          required: false
      responses:
        200:
          description: OK
          schema:
            $ref: "#/definitions/WMTSStoreLayerInfo"
          examples:
            application/xml: |
              <wmtsLayer>
                <name>dem</name>
                <nativeName>usgs:dem</nativeName>
                <namespace>
                  <name>cite</name>
                  <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/namespaces/cite.xml" type="application/xml"/>
                </namespace>
                <title>Digital elevation model</title>
                <description>USGS GTOPO30 digital elevation model</description>
                <abstract>USGS GTOPO30 digital elevation model</abstract>
                <keywords>
                  <string>WCS</string>
                  <string>GeoTIFF</string>
                  <string>W100N40</string>
                </keywords>
                <nativeCRS>GEOGCS[&quot;WGS 84&quot;, &#xd;
                DATUM[&quot;World Geodetic System 1984&quot;, &#xd;
                  SPHEROID[&quot;WGS 84&quot;, 6378137.0, 298.257223563, AUTHORITY[&quot;EPSG&quot;,&quot;7030&quot;]], &#xd;
                  AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]], &#xd;
                PRIMEM[&quot;Greenwich&quot;, 0.0, AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]], &#xd;
                UNIT[&quot;degree&quot;, 0.017453292519943295], &#xd;
                AXIS[&quot;Geodetic longitude&quot;, EAST], &#xd;
                AXIS[&quot;Geodetic latitude&quot;, NORTH], &#xd;
                AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]]</nativeCRS>
                <srs>EPSG:4326</srs>
                <nativeBoundingBox>
                  <minx>-100.0</minx>
                  <maxx>-60.000000000015994</maxx>
                  <miny>-9.999999999980012</miny>
                  <maxy>39.99999999999999</maxy>
                  <crs>EPSG:4326</crs>
                </nativeBoundingBox>
                <latLonBoundingBox>
                  <minx>-100.0</minx>
                  <maxx>-60.000000000015994</maxx>
                  <miny>-9.999999999980012</miny>
                  <maxy>39.99999999999999</maxy>
                  <crs>EPSG:4326</crs>
                </latLonBoundingBox>
                <projectionPolicy>FORCE_DECLARED</projectionPolicy>
                <enabled>true</enabled>
                <metadata>
                  <entry key="cachingEnabled">false</entry>
                </metadata>
                <store class="wmtsStore">
                  <name>cite:altgs</name>
                  <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/cite/wmtsstores/altgs.xml" type="application/xml"/>
                </store>
              </wmtsLayer>
            application/json: |
              {"wmtsLayer":{"name":"dem","nativeName":"usgs:dem","namespace":{"name":"cite","href":"http://localhost:8080/geoserver/rest/namespaces/cite.json"},"title":"Digital elevation model","description":"USGS GTOPO30 digital elevation model","abstract":"USGS GTOPO30 digital elevation model","keywords":{"string":["WCS","GeoTIFF","W100N40"]},"nativeCRS":"GEOGCS[\"WGS 84\", \r\n  DATUM[\"World Geodetic System 1984\", \r\n    SPHEROID[\"WGS 84\", 6378137.0, 298.257223563, AUTHORITY[\"EPSG\",\"7030\"]], \r\n    AUTHORITY[\"EPSG\",\"6326\"]], \r\n  PRIMEM[\"Greenwich\", 0.0, AUTHORITY[\"EPSG\",\"8901\"]], \r\n  UNIT[\"degree\", 0.017453292519943295], \r\n  AXIS[\"Geodetic longitude\", EAST], \r\n  AXIS[\"Geodetic latitude\", NORTH], \r\n  AUTHORITY[\"EPSG\",\"4326\"]]","srs":"EPSG:4326","nativeBoundingBox":{"minx":-100,"maxx":-60.000000000015994,"miny":-9.999999999980012,"maxy":39.99999999999999,"crs":"EPSG:4326"},"latLonBoundingBox":{"minx":-100,"maxx":-60.000000000015994,"miny":-9.999999999980012,"maxy":39.99999999999999,"crs":"EPSG:4326"},"projectionPolicy":"FORCE_DECLARED","enabled":true,"metadata":{"entry":{"@key":"cachingEnabled","$":"false"}},"store":{"@class":"wmtsStore","name":"cite:altgs","href":"http://localhost:8080/geoserver/rest/workspaces/cite/wmtsstores/altgs.json"}}}

    post:
      operationId: postWMTSStoreStoreLayer
      tags:
       - "WMTSLayers"
      description: Invalid. Use PUT to edit a layer, or POST on the /wmtslayers endpoint to add a new layer.
      responses:
        405:
          description: Method Not Allowed

    put:
      operationId: putWMTSStoreStoreLayer
      tags:
       - "WMTSLayers"
      description: Edits an existing WMTS store layer.
      parameters:
        - name: workspace
          in: path
          description: Name of the workspace
          required: true
          type: string
        - name: wmtsstore
          in: path
          description: Name of the store
          required: true
          type: string
        - name: wmtslayer
          in: path
          description: Name of the layer to be edited
          required: true
          type: string
        - name: WMTSStoreLayerBody
          in: body
          description: Body of the WMTS store layer
          required: true
          schema:
            $ref: "#/definitions/WMTSStoreLayerInfo"
        - name: calculate
          in: query
          description: Specifies whether to recalculate any bounding boxes for a wmts layer. Some properties are automatically recalculated when necessary. In particular, the native bounding box is recalculated when the projection or projection policy are changed, and the lat/lon bounding box is recalculated when the native bounding box is recalculated, or when a new native bounding box is explicitly provided in the request. (The native and lat/lon bounding boxes are not automatically recalculated when they are explicitly included in the request.) In addition, the client may explicitly request a fixed set of fields to calculate, by including a comma-separated list of their names in the recalculate parameter.  The empty parameter 'recalculate=' is useful avoid slow recalculation when operating against large datasets as 'recalculate=' avoids calculating any fields, regardless of any changes to projection, projection policy, etc. The nativebbox parameter 'recalculate=nativebbox' is used recalculates the native bounding box, while avoiding recalculating the lat/lon bounding box. Recalculate parameters can be used in together - 'recalculate=nativebbox,latlonbbox' can be used after a bulk import to  to recalculates both the native bounding box and the lat/lon bounding box.
          required: false
          type: array
          collectionFormat: csv
          minItems: 0
          maxItems: 2
          items:
            type: string
            enum: [nativebbox,latlonbbox]
      consumes:
        - application/xml
        - application/json
      responses:
        201:
          description: Created
          headers:
            Location:
              description: Location of the newly created layer
              type: string

    delete:
      operationId: deleteWMTSStoreStoreLayer
      tags:
       - "WMTSLayers"
      description: Deletes a layer from the server.
      parameters:
        - name: workspace
          in: path
          description: Name of the workspace
          required: true
          type: string
        - name: wmtsstore
          in: path
          description: Name of the store
          required: true
          type: string
        - name: wmtslayer
          in: path
          description: Name of the layer to be deleted
          required: true
          type: string
        - name: recurse
          in: query
          description: Recursively deletes all layers referenced by the specified wmtslayer. Allowed values for this parameter are true or false. The default value is false. A request with 'recurse=false' will fail if any layers reference the wmtslayer.
          required: false
          type: boolean
          default: false
      responses:
        200:
          description: OK


definitions:

  WMTSStoreLayersList:
    title: wmtsLayers
    type: array
    items:
      title: wmtsLayer
      type: object
      properties:
         name:
           type: string
           description: Name of the layer
         link:
           type: string
           description: URL of the layer representation

  WMTSStoreLayersAvailableList:
    title: list
    type: array
    items:
      title: wmtsLayerName
      type: object
      properties:
         name:
           type: string
           description: Name of the layer
         link:
           type: string
           description: URL of the layer representation

  WMTSStoreLayerInfo:
    title: wmtsLayer
    xml:
      name: wmtsLayer
    type: object
    properties:
      name:
        type: string
        description: Name of the layer, corresponding to the published name of the resource
      nativeName:
        type: string
        description: Name of the layer as known on the remote WMTS
      namespace:
        type: object
        description: Namespace of the layer
        properties:
          name:
            type: string
            description: Name of the namespace
          link:
            type: string
            description: URL to the namespace representation.
      title:
        type: string
        description: Title of the layer
      abstract:
        type: string
        description: Description of the layer
      description:
        type: string
        description: Same as abstract
      keywords:
        type: array
        description: Collection of keywords associated with the layer
        items:
          type: object
          properties:
            string:
              type: string
              description: Keyword
      metadatalinks:
        type: object
        description: Wraps a collection of metadata links
        properties:
          metadataLink:
            type: array
            description: A collection of metadata links
            items:
              type: object
              properties:
                type:
                  type: string
                  description: MIME type
                metadataType:
                  type: string
                  description: Type of metadata such as "FGDC"
                content:
                  type: string
                  description: Link URL
      dataLinks:
        type: object
        description: Wraps a collection of data links
        properties:
          metadataLink:
            type: array
            description: Collection of data links
            items:
              type: object
              properties:
                type:
                  type: string
                  description: MIME type
                content:
                  type: string
                  description: Link URL
      nativeCRS:
        type: string
        description: Native coordinate reference system object in WKT
      srs:
        type: string
        description: Identifier of coordinate reference system
      nativeBoundingBox:
        type: object
        description: Bounds of the layer in its declared CRS.
        properties:
          minx:
            type: number
            description: Min x coordinate
          maxx:
            type: number
            description: Max x coordinate
          miny:
            type: number
            description: Min y coordinate
          maxy:
            type: number
            description: Max y coordinate
          crs:
            type: string
            description: Coordinate reference system of the bounding box
      latLonBoundingBox:
        type: object
        description: Bounds of the layer in latitude / longitude. This value represents a "fixed value" and is not calculated.
        properties:
          minx:
            type: number
            description: Min x coordinate
          maxx:
            type: number
            description: Max x coordinate
          miny:
            type: number
            description: Min y coordinate
          maxy:
            type: number
            description: Max y coordinate
          crs:
            type: string
            description: Coordinate reference system object of the bounding box  
      projectionPolicy:
        type: string
        description: How to handle the coordinate reference system (native versus declared)
        enum:
        - FORCE_DECLARED
        - REPROJECT_TO_DECLARE
        - NONE
      enabled:
        type: boolean
        description: Whether the layer is enabled
      metadata:
        type: array
        description: A list of key/value metadata pairs.
        items:
          $ref: "#/definitions/MetadataEntry"
      store:
        type: object
        description: Store conaining the resource
        properties:
          '@class':
            type: string
            description: Class of the store
          name:
            type: string
            description: Name of the store
          href:
            type: string
            description: URL to the data store

  MetadataEntry:
      type: object
      title: entry
      properties:
        '@key':
          title: key
          type: string
          enum:
          - regionateStrategy
          - regionateFeatureLimit
          - cacheAgeMax
          - cachingEnabled
          - regionateAttribute
          - indexingEnabled
          - dirName
          description: Key used for metadata entry
        text:
          type: string
          description: Value of given key
